package com.come4loves.game.module.fight.action;

import com.come4loves.game.module.battle.helper.PBConvertHelper;
import com.come4loves.game.module.fight.constants.FightMoment;
import com.come4loves.game.proto.BattleProto;
import com.google.protobuf.GeneratedMessage.Builder;

public class MomentAction extends Action {
	private FightMoment moment;
	private int roundNum;
	public MomentAction(long actorId, FightMoment moment, int roundNum) {
		super(actorId);
		this.moment = moment;
		this.roundNum = roundNum;
	}

	public FightMoment getMoment() {
		return moment;
	}

	public void setMoment(FightMoment moment) {
		this.moment = moment;
	}
	
	public int getRoundNum() {
		return roundNum;
	}



	@Override
	public Builder<?> toProtocolBufferBuilder() {
		BattleProto.MomentAction.Builder builder = BattleProto.MomentAction.newBuilder();
		builder.setId(this.id);
		builder.setRoundNum(this.roundNum);
		builder.setMonent(PBConvertHelper.fightMomentConvert(this.moment));
		return builder;
	}
}
